import {getMovieRequest} from '../../api'
import store from '../store';
//30.第三步：分发actions的函数返回一个函数，让中间件去帮我们调用，等到请求发送之后，设置action
//30.第四步：写在moviereducer中
 export const movieActions =()=>{
          return async ()=>{
            const result = await getMovieRequest();
                store.dispatch({
                    type:'getMovieList',
                    data:result.data.data.list
                })

            }
        }